package main

import (
	"errors"
	"unsafe"
)

func typeOfInt64(data interface{}) (int64, error) {
	switch data.(type) {
	case int, uint, int8, int16, int32, int64, uint8, uint16, uint32, uint64:
		return *(*int64)(unsafe.Pointer(&data)), nil
	}
	return 0, errors.New("no this type")

}
